/**
 * 
 */
package com.surthi.app.magazine.util;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author Vdevi
 *
 */
public final class DocumentUtils {
	private static final Logger LOGGER = LoggerFactory
			.getLogger(DocumentUtils.class);

	public static FileInputStream getStream(final String path) {

		if (StringUtils.isBlank(path)) {
			throw new IllegalArgumentException("source path can not be blank");
		}
		try {
			return new FileInputStream(path);
		} catch (FileNotFoundException e) {
			LOGGER.error("File: " + path + " - does not exist");
		}
		return null;
	}
}
